package com.ysd.lis.controller.bac;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacTestCultureMedium;
import com.ysd.lis.request.bac.BloodCulMediumParam;
import com.ysd.lis.request.bac.DeleteAllBacTestCultuMediumParam;
import com.ysd.lis.service.bac.BacTestCultureMediumService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 微生物检验应用培养基 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-04-11
 */
@RestController
@RequestMapping("/api/bac/bac-test-culture-medium")
public class BacTestCultureMediumController extends BaseController {
    @Autowired
    BacTestCultureMediumService bacTestCultureMediumService;

    @ApiOperation("查询")
    @GetMapping("/findBacTestCultureMediumList")
    public Result findBacTestCultureMediumList(BacTestCultureMedium bacTestCultureMedium) {
        return bacTestCultureMediumService.findBacTestCultureMediumList(bacTestCultureMedium);
    }

    @ApiOperation("获取血培养用培养基")
    @GetMapping("/findBloodCulMediumList")
    public Result findBloodCulMediumList(BloodCulMediumParam input) {
        return bacTestCultureMediumService.findBloodCulMediumList(input);
    }

    @ApiOperation("增加")
    @PostMapping("/addBacTestCultureMedium")
    public Result addBacTestCultureMedium(@RequestBody BacTestCultureMedium bacTestCultureMedium) {
        return bacTestCultureMediumService.addBacTestCultureMedium(bacTestCultureMedium);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteBacTestCultureMedium")
    public Result deleteBacTestCultureMedium(@RequestBody BacTestCultureMedium bacTestCultureMedium) {
        return bacTestCultureMediumService.deleteBacTestCultureMedium(bacTestCultureMedium);
    }

    @ApiOperation("修改")
    @PostMapping("/updateBacTestCultureMedium")
    public Result updateBacTestCultureMedium(@RequestBody BacTestCultureMedium bacTestCultureMedium) {
        return bacTestCultureMediumService.updateBacTestCultureMedium(bacTestCultureMedium);
    }

    @ApiOperation("批量修改")
    @PostMapping("/batchUpdateBacTestCultureMedium")
    public Result batchUpdateBacTestCultureMedium(@RequestBody List<BacTestCultureMedium> bacTestCultureMediumList) {
        return bacTestCultureMediumService.batchUpdateBacTestCultureMedium(bacTestCultureMediumList);
    }

    @ApiOperation("批量新增培养基")
    @PostMapping("/batchInsertBacTestCultureMedium")
    public Result batchInsertBacTestCultureMedium(@RequestBody List<BacTestCultureMedium> bacTestCultureMediumList) {
        return bacTestCultureMediumService.batchInsertBacTestCultureMedium(bacTestCultureMediumList);
    }

    @ApiOperation("批量删除")
    @PostMapping("/allDeleteBacTestCultureMedium")
    public Result allDeleteBacTestCultureMedium(@RequestBody DeleteAllBacTestCultuMediumParam input) {
        return bacTestCultureMediumService.allDeleteBacTestCultureMedium(input);
    }
}
